package com.example.mall.common.core.response;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;

@Getter
@Setter
public class SuccessResponse extends BaseResponse {
    private static String MESSAGE = "ok";
    private static Integer CODE = 0;
    /** 数据, 默认为: null */
    private Object data;

    @Autowired
    public SuccessResponse(Integer code, String messag, Object data) {
        super(code, messag);
        this.data = data;
    }

    public SuccessResponse(String messag, Object data) {
        super(CODE, messag);
        this.data = data;
    }

    public SuccessResponse(Object data) {
        super(CODE, MESSAGE);
        this.data = data;
    }

    public SuccessResponse() {
        super(CODE, MESSAGE);
    }
}
